<template>
  <div>
    <main>
      <div>
        <van-nav-bar title="评论" left-text="" left-arrow @click-left="fun()" />
        <img :src="this.$route.params.pinlun.img" alt="" />
        <span> {{ this.$route.params.pinlun.name }}</span>
        <div class="toux">
          <div class="zhiw">{{ this.$route.params.pinlun.job }}</div>
          <div class="neirong">
            <div class="jiedu">
              神解读
              <i @click="fun(v)">{{ this.$route.params.pinlun.jiedu }}</i>
              <div class="xinshi">
                <b class="wen2">{{ this.$route.params.pinlun.neirong }}</b>
              </div>
            </div>
          </div>
          <div id="zan">
            <b class="iconfont icon-dianzan"
              >{{ this.$route.params.pinlun.zan }}&emsp;
            </b>
          </div>
        </div>
      </div>
    </main>
    <div class="top">7条评论</div>
    <footer class="ping" v-for="(v, i) in this.$store.state.qiqi.arr" :key="i">
      <img :src="v.img" alt="" />
      <span> {{ v.name }}</span>
      <div class="zhiw">{{ v.job }}</div>
      <div class="lun">{{ v.lun }}</div>
      <div class="name">{{ getriqi() }}</div>
    </footer>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    getriqi() {
      var date = new Date();
      var yue = date.getMonth() + 1;
      var ri = date.getDate();
      var shi = date.getHours();
      var fen = date.getMinutes();
      return yue + "-" + ri + " " + shi + ":" + fen;
    },
    fun() {
      this.$router.push("/baike");
    },
  },
  mounted() {
    this.$store.dispatch("QI_WEN");
  },
};
</script>

<style lang="scss" scoped>
* {
  font-size: 0.14rem;
}
img {
  border-radius: 50%;
  width: 0.3rem;
  height: 0.3rem;
  margin-right: 0.05rem;
  margin-top: 0.2rem;
  margin-left: 0.2rem;
}
main {
  div {
    .toux {
      margin-top: -0.31rem;
      margin-left: 0.2rem;
      img {
        border-radius: 50%;
        width: 0.3rem;
        height: 0.3rem;
        margin-right: 0.05rem;
      }
      span {
        font-size: 0.14rem;
        position: relative;
        top: -17px;
        font-weight: 700;
      }
      .zhiw {
        font-size: 0.12rem;
        color: #9b9b9b;
        margin-top: 0.31rem;
        margin-left: 0.12rem;
      }
    }
    .neirong {
      margin-top: 0.16rem;
      .jiedu {
        font-size: 0.12rem;
        color: #5fb2b0;
        i {
          font-size: 0.16rem;
          color: black;
        }
      }
      .xinshi {
        width: 3.33rem;
        height: 100%;
        border-radius: 0.1rem;
        margin: 0.15rem 0.1rem;
        background-color: #e4e4e474;
        text-align: center;
        line-height: 0.25rem;
        .wen1 {
          color: black;
          font-size: 0.18rem;
          margin-left: 0.1rem;
          padding-right: 0.15rem;
          line-height: 0.44rem;
        }
        .wen2 {
          color: black;
        }
      }
    }
    #zan {
      display: flex;
      font-size: 0.12rem;
      justify-content: space-between;
      padding-right: 0.1rem;
      .icon-bixin {
        border: 0.01rem solid #5fb2b0;
        width: 0.45rem;
        color: #5fb2b0;
        text-align: center;
      }
    }
  }
}
.top {
  font-size: 0.18rem;
  margin-top: 0.3rem;
  margin-left: 0.2rem;
}
.ping {
  .lun {
    margin-left: 0.2rem;
    margin-left: 0.61rem;
    margin-top: 0.21rem;
    margin-bottom: 0.2rem;
  }
  .zhiw {
    font-size: 0.12rem;
    color: #9b9b9b;
    margin-left: 0.54rem;
  }
  .name {
    font-size: 0.12rem;
    margin-left: 0.63rem;
    color: #9b9b9b;
  }
}
</style>